
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Data.Objects.DataClasses;

namespace Dev.Net.Data
{
	[MetadataType(typeof(AssemblyMetadata))]
	public partial class Assembly
	{
		internal sealed class AssemblyMetadata
		{
		
			[Required(ErrorMessage="ID is required")]
    		public Int32 ID { get; set; }

			[Required(ErrorMessage="Assembly Name is required")]
			[StringLength(255, ErrorMessage="Assembly Name is too long (maximum 255 characters)")]
    		public String AssemblyName { get; set; }

			[Required(ErrorMessage="Assembly Content is required")]
    		public Byte[] AssemblyContent { get; set; }

			[Required(ErrorMessage="Version is required")]
    		public Int32 VersionID { get; set; }

    		public EntityCollection<Version> Version { get; set; }

    		public EntityCollection<Namespace> Namespaces { get; set; }

		}
	}
	
	[MetadataType(typeof(ContentMetadata))]
	public partial class Content
	{
		internal sealed class ContentMetadata
		{
		
			[Required(ErrorMessage="ID is required")]
    		public Int32 ID { get; set; }

    		public Int32 SectionID { get; set; }

    		public Byte Status { get; set; }

    		public EntityCollection<Section> Section { get; set; }

		}
	}
	
	[MetadataType(typeof(ContextMetadata))]
	public partial class Context
	{
		internal sealed class ContextMetadata
		{
		
			[Required(ErrorMessage="ID is required")]
    		public Int32 ID { get; set; }

			[Required(ErrorMessage="Context Type is required")]
    		public Int32 ContextTypeID { get; set; }

    		public Int32 NamespaceID { get; set; }

			[Required(ErrorMessage="Name is required")]
			[StringLength(255, ErrorMessage="Name is too long (maximum 255 characters)")]
    		public String Name { get; set; }

    		public EntityCollection<ContextType> ContextType { get; set; }

    		public EntityCollection<Namespace> Namespace { get; set; }

    		public EntityCollection<Section> Sections { get; set; }

		}
	}
	
	[MetadataType(typeof(ContextTypeMetadata))]
	public partial class ContextType
	{
		internal sealed class ContextTypeMetadata
		{
		
			[Required(ErrorMessage="ID is required")]
    		public Int32 ID { get; set; }

			[Required(ErrorMessage="Name is required")]
			[StringLength(50, ErrorMessage="Name is too long (maximum 50 characters)")]
    		public String Name { get; set; }

    		public EntityCollection<Context> Contexts { get; set; }

		}
	}
	
	[MetadataType(typeof(NamespaceMetadata))]
	public partial class Namespace
	{
		internal sealed class NamespaceMetadata
		{
		
			[Required(ErrorMessage="ID is required")]
    		public Int32 ID { get; set; }

			[Required(ErrorMessage="Assembly is required")]
    		public Int32 AssemblyID { get; set; }

			[StringLength(255, ErrorMessage="Name is too long (maximum 255 characters)")]
    		public String Name { get; set; }

    		public EntityCollection<Assembly> Assembly { get; set; }

    		public EntityCollection<Context> Contexts { get; set; }

		}
	}
	
	[MetadataType(typeof(RoleMetadata))]
	public partial class Role
	{
		internal sealed class RoleMetadata
		{
		
			[Required(ErrorMessage="ID is required")]
    		public Int32 ID { get; set; }

			[Required(ErrorMessage="Role Name is required")]
			[StringLength(30, ErrorMessage="Role Name is too long (maximum 30 characters)")]
    		public String RoleName { get; set; }

    		public EntityCollection<UserRole> UserRoles { get; set; }

		}
	}
	
	[MetadataType(typeof(SectionMetadata))]
	public partial class Section
	{
		internal sealed class SectionMetadata
		{
		
			[Required(ErrorMessage="ID is required")]
    		public Int32 ID { get; set; }

			[Required(ErrorMessage="Context is required")]
    		public Int32 ContextID { get; set; }

			[StringLength(50, ErrorMessage="Name is too long (maximum 50 characters)")]
    		public String Name { get; set; }

    		public EntityCollection<Context> Context { get; set; }

    		public EntityCollection<Content> Contents { get; set; }

		}
	}
	
	[MetadataType(typeof(UserMetadata))]
	public partial class User
	{
		internal sealed class UserMetadata
		{
		
			[Required(ErrorMessage="ID is required")]
    		public Int32 ID { get; set; }

			[Required(ErrorMessage="First Name is required")]
			[StringLength(30, ErrorMessage="First Name is too long (maximum 30 characters)")]
    		public String FirstName { get; set; }

			[Required(ErrorMessage="Last Name is required")]
			[StringLength(30, ErrorMessage="Last Name is too long (maximum 30 characters)")]
    		public String LastName { get; set; }

			[Required(ErrorMessage="Email is required")]
			[StringLength(50, ErrorMessage="Email is too long (maximum 50 characters)")]
			[DataType(DataType.EmailAddress, ErrorMessage="Email is invalid")]
    		public String Email { get; set; }

			[Required(ErrorMessage="Password is required")]
			[StringLength(50, ErrorMessage="Password is too long (maximum 50 characters)")]
    		public String Password { get; set; }

    		public EntityCollection<UserRole> UserRoles { get; set; }

		}
	}
	
	[MetadataType(typeof(UserRoleMetadata))]
	public partial class UserRole
	{
		internal sealed class UserRoleMetadata
		{
		
			[Required(ErrorMessage="ID is required")]
    		public Int32 ID { get; set; }

			[Required(ErrorMessage="User is required")]
    		public Int32 UserID { get; set; }

			[Required(ErrorMessage="Role is required")]
    		public Int32 RoleID { get; set; }

    		public EntityCollection<Role> Role { get; set; }

    		public EntityCollection<User> User { get; set; }

		}
	}
	
	[MetadataType(typeof(VersionMetadata))]
	public partial class Version
	{
		internal sealed class VersionMetadata
		{
		
			[Required(ErrorMessage="ID is required")]
    		public Int32 ID { get; set; }

			[Required(ErrorMessage="Major is required")]
    		public Int32 Major { get; set; }

			[Required(ErrorMessage="Minor is required")]
    		public Int32 Minor { get; set; }

			[Required(ErrorMessage="Build is required")]
    		public Int32 Build { get; set; }

			[Required(ErrorMessage="Revision is required")]
    		public Int32 Revision { get; set; }

    		public EntityCollection<Assembly> Assemblies { get; set; }

		}
	}
	
	
}

